﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace IronOne.SalesOne.SalesOneWeb.UserManagement
{

    public partial class ResetPassword : SOSecurityPage
    {
        int flag = 0;
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    ValidateUserCredentials(Request.Url.LocalPath);
                }

                if (Session["msg"] != null)
                {
                    if (Session["msg"].Equals("1"))
                    {
                        MassageSummery("IIS401");
                        Session.Remove("msg");
                    }
                    else if (Session["msg"].Equals("2"))
                    {
                        MassageSummery("IIS502");
                        Session.Remove("msg");
                    }
                }
            }
            catch (Exception)
            {

            }
            
            
        }


        protected void ChangePassword1_ChangedPassword(object sender, EventArgs e)
        {
            Session["msg"] = "1";
            Response.Redirect("~/UserManagement/ResetPassword.aspx");

            //if (ChangePassword1.)
            //{
                
            //}
            //ChangePassword1.TabIndex = 0;

        }

        protected void ChangePassword1_ContinueButtonClick(object sender, EventArgs e)
        {
            Response.Redirect("~/Default.aspx");


        }

        protected void ChangePassword1_CancelButtonClick(object sender, EventArgs e)
        {
            Response.Redirect("~/Default.aspx");
        }
    }
}
